<#include "../include/public.ftl"/>

<@head title="用户列表"/>

    <@body>
        <@search_box action="/admin/user/list" method="get">
            <@button_add text="新增" icon="&#xe654;" href="/admin/user/v_add"/>
            <@input_search label="名称" value="${(condition.name)!''}" placeholder="请输入名称" />
            <@button type="submit" text="搜索"/>
        </@search_box>

        <@table ths=["用户名","密码","创建时间","更新时间","状态(0:正常,1:删除)","操作"]; item>
            <@t_row text="${(item.username)!''}"/>
            <@t_row text="${(item.password)!''}"/>
            <@t_row text="${(item.createTime?string('yyyy-MM-dd HH:mm:ss'))!''}"/>
            <@t_row text="${(item.updateTime?string('yyyy-MM-dd HH:mm:ss'))!''}"/>
            <@t_row text="${(item.deleted)!''}"/>
            <@t_row_picture src="${item.picture!''}"/>
            <@t_operator>
                <@button_edit href="/admin/user/v_update?id=${(item.id)!'0'}"/>
                <@button_del href="/admin/user/delete?id=${(item.id)!'0'}&page=${(page.current)!1}"/>
            </@t_operator>
        </@table>
    </@body>
<@footer>
<script>
    layui.use(['element','form','layer','laypage'], function(){
        var element = layui.element;
        var layer = layui.layer;
        var $ = layui.jquery;

        <@page_plugin action="/admin/user/list"/>

        <@add_edit_plugin area="['50%','300px']"/>

        <@delete_plugin/>

        <@preview_photo/>

    });
</script>
</@footer>